
#include "Mesh.h"
#include "Indices.h"
#include "VertexAttributeCollection.h"

using namespace Core;

Core::Mesh::Mesh()
{
	m_pAttributes = new VertexAttributeCollection();
	m_pIndices = new IndicesBase(IndicesType::UnsignedInt);

	_primitiveType = PrimitiveType::Triangles;
	_frontFaceWindingOrder = WindingOrder::Counterclockwise;
}

Core::Mesh::~Mesh()
{
	delete m_pAttributes;
	delete m_pIndices;
}

Core::VertexAttributeCollection* Core::Mesh::GetAttributes() const
{
	return m_pAttributes;
}

IndicesBase* Core::Mesh::GetIndices() const
{
	return m_pIndices;
}

Core::PrimitiveType Core::Mesh::GetPrimitiveType() const
{
	return _primitiveType;
}

Core::WindingOrder Core::Mesh::GetFrontFaceWindingOrder() const
{
	return _frontFaceWindingOrder;
}

void Core::Mesh::SetIndices(IndicesBase* indices)
{
	m_pIndices = indices;
}

void Core::Mesh::SetPrimitiveType(PrimitiveType pt)
{
	_primitiveType = pt;
}

void Core::Mesh::SetFrontFaceWindingOrder(WindingOrder wo)
{
	_frontFaceWindingOrder = wo;
}

